package com.fpt.group3.service.exception;

import org.apache.log4j.Level;
import org.apache.log4j.Logger;

/**
 * 
 * @author John Tran
 *
 */
public class LoggerClass {
	public static void debug(String className, String logMsg) {
		Logger log = Logger.getLogger(className);
		log.setLevel(Level.DEBUG);
		log.debug(logMsg);
	}

	public static void info(String className, String logMsg) {
		Logger log = Logger.getLogger(className);
		log.setLevel(Level.INFO);
		log.info(logMsg);
	}

	public static void warn(String className, String logMsg) {
		Logger log = Logger.getLogger(className);
		log.setLevel(Level.WARN);
		log.warn(logMsg);
	}

	public static void error(String className, String logMsg) {
		Logger log = Logger.getLogger(className);
		log.setLevel(Level.ERROR);
		log.error(logMsg);
	}
}
